package com.feiyu.aop;


import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * 注解的方式执行的切面的通知
 */
@Slf4j
@Aspect
@Component
public class MyAspect2 {

    @Pointcut("@annotation(com.feiyu.aop.MyLog)")
    public  void pt(){}

    @Before("pt()")
    public  void  before(){

        log.info("MyAspect2-MyLog-before");
    }


}
